package com.md.domain.model.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.md.base.BasePO;
import com.md.util.StringUtil;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * @author 刘骄阳
 * 2023-01-05 18:53
 */
@Data
@EqualsAndHashCode(callSuper = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
@TableName("role_api")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class RoleApis extends BasePO {
  /**
   * 接口id
   */
  @JsonFormat(shape = JsonFormat.Shape.STRING)
  private Long apiId;

  /**
   * 角色id
   */
  @JsonFormat(shape = JsonFormat.Shape.STRING)
  private Long roleId;

  /**
   * 是否继承父级(true: 继承父级; false: 子集特有的)
   */
  private Boolean extendsParentRole;

  @Override
  public String toString() {
    return StringUtil.objectToJson(this);
  }
}
